﻿using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using MVVMLightDemo.Models;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MVVMLightDemo.ViewModel
{
    public class VM_DynamicMenu:ViewModelBase
    {
        private ObservableCollection<string> messageQuene;

        public ObservableCollection<string> MessageQuene
        {
            get
            {
                return messageQuene;
            }
            set
            {
                messageQuene = value;
                this.RaisePropertyChanged(nameof(MessageQuene));
            }
        }

        private List<MenuItemModel> menuList;

        public List<MenuItemModel> MenuList
        {
            get
            {
                return menuList;
            }
            set
            {
                menuList = value;
                this.RaisePropertyChanged(nameof(MenuList));
            }
        }


        #region Command
        public RelayCommand AddCommand
        {
            get; set;
        }

        public RelayCommand DeleteCommand
        {
            get; set;
        }
        public RelayCommand FixCommand
        {
            get; set;
        }
        public RelayCommand SearchCommand
        {
            get; set;
        }

        public RelayCommand AddManCommand
        {
            get; set;
        }
        public RelayCommand AddGirlCommand
        {
            get;set;
        }

        public RelayCommand AddPrivateGirlCommand
        {
            get; set;
        }

        #endregion

        public VM_DynamicMenu()
        {
            MenuList = new List<MenuItemModel>();
            MessageQuene = new ObservableCollection<string>();


        }

        public void AddMessage(string msg)
        {
            this.MessageQuene.Add(msg);
        }
    }
}
